package com.project.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * 角色实体
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_role")
public class Role implements Serializable {

    private static final long serialVersionUID = 1L;

    /** 角色编号*/
    @TableId(value = "pk_roleId", type = IdType.AUTO)
    private Integer roleId;

    /** 用户名称*/
    @TableField("r_name")
    private String name;

    /** 权限集合（业务属性）*/
    @TableField(exist = false)
    List<Grade> grade ;

}
